//
//  AboutUsViewController.m
//  yunyan
//
//  Created by haichuang on 2018/2/26.
//  Copyright © 2018年 haichuang. All rights reserved.
//

#import "AboutUsViewController.h"

@interface AboutUsViewController (){
    
    UILabel * label;
}

@end

@implementation AboutUsViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
   
    self.view.backgroundColor = RGBA(243, 245, 248, 1);
   [self customNaviItemTitle:@"关于我们" isLeft:YES];
    [self getAboutUs];

    
}

-(void)getAboutUs{
    
    
    [PostNetWorking netWorkingStr:RequestUrlStr(aboutUs_message_api) Success:^(id responseObject) {
        
         WeakSelf;
        UIView * contenview = [[UIView alloc]init];
        [self.view addSubview:contenview];
        [contenview mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo (self.view .mas_left).offset (10.0) ;
            make.right.equalTo (self.view.mas_right).offset (-10.0);
            make.top.equalTo (weakSelf.view).offset (10.0) ;
            
            
        }];
        contenview.backgroundColor = [UIColor whiteColor];
        
        UILabel * label = [[UILabel alloc]init];
        label.backgroundColor = [UIColor whiteColor];
        [contenview addSubview:label];
        
        [label mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo (contenview.mas_left).offset (9.0f);
            make.right.equalTo (contenview.mas_right).offset (-9.0f);
            make.top.equalTo (contenview.mas_top).offset (9.f);
        }];
        
        label.text = responseObject[@"content"];
        label.numberOfLines = 0;
        label.textColor = RGBA(51, 51, 51, 1);
        label.font = [UIFont systemFontOfSize:18.0f];
        [contenview mas_updateConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo (label.mas_bottom).offset (30.f);
        }];
        
    } failed:^(NSURLSessionDataTask * _Nullable task, NSError *error) {
        
        SHuiMBhudTextNetError;
    }];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
